//
//  ViewController.m
//  singlePushDemo
//
//  Created by JM on 15/9/24.
//  Copyright (c) 2015年 JM. All rights reserved.
//

#import "ViewController.h"
#import "DYSMSCenter.h"

static NSString *SCIENCE = @"SCIENCE";

@interface ViewController () <DYSMSProtocol>
@end

@implementation ViewController

- (void)viewDidLoad {
    
    [super viewDidLoad];
    
    // 创建 通知类型
    [DYSMSCenter createSMSType:SCIENCE];
    
    // 添加接收者到指定的通知类型
    [DYSMSCenter addRecever:self
                    withSMSType:SCIENCE];
    
    // 消息中心发送通知
    [DYSMSCenter sendMessage:@"场景变化" byType:SCIENCE];
}

- (void)didReceiveMessage:(id)message withtype:(NSString *)aSMSType {
    
    NSLog(@"%@  %@", message, aSMSType);
}

@end
